package broadcast

import (
	"engine/PbMsgHelper"
	"gitee.com/ameise84/e3dds"
	"google.golang.org/protobuf/proto"
)

// PushToService 推送指定服务广播(慎用,通常用于广播到管理服务)
func PushToService(srvID string, pbMsg proto.Message) {
	protoc, body := pbMsgHelper.PbMsgToRpcMsg(pbMsg)
	e3dds.BroadcastToService(srvID, protoc, body)
}

func PushToActor(srvID string, pbMsg proto.Message) {
	protoc, body := pbMsgHelper.PbMsgToRpcMsg(pbMsg)
	e3dds.BroadcastToActor(srvID, protoc, body)
}
